//
//  SubViewController.m
//  MenuScrollview
//
//  Created by zhouLiHuan on 2017/1/19.
//  Copyright © 2017年 zhouLiHuan. All rights reserved.
//

#import "SubViewController.h"

@interface SubViewController ()

@end

@implementation SubViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    
    UILabel *showLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 50)];
    showLabel.center = self.view.center;
    showLabel.text = [NSString stringWithFormat:@"这是第%ld个控制器",self.index];
    showLabel.textColor = [UIColor blackColor];
    [self.view addSubview:showLabel];
    
    
    switch (self.index) {
        case 0:
            self.view.backgroundColor = [UIColor greenColor];
            break;
        case 1:
            self.view.backgroundColor = [UIColor yellowColor];
            break;
        case 2:
            self.view.backgroundColor = [UIColor whiteColor];
            break;
        case 3:
            self.view.backgroundColor = [UIColor redColor];
            break;
        case 4:
            self.view.backgroundColor = [UIColor blueColor];
            break;
        case 5:
            self.view.backgroundColor = [UIColor brownColor];
            break;
        case 6:
            self.view.backgroundColor = [UIColor grayColor];
            break;
        case 7:
            self.view.backgroundColor = [UIColor cyanColor];
            break;
        case 8:
            self.view.backgroundColor = [UIColor purpleColor];
            break;
        case 9:
            self.view.backgroundColor = [UIColor orangeColor];
            break;
        default:
            break;
    }

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
